package com.evil.common.application.dto.robot.rule;

import com.evil.common.application.dto.robot.RobotRuleDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 机器人规则实体
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RobotRulesDTO extends RobotRuleSourceDTO {

    private Long enterpriseId;

    @Valid
    private List<RobotRuleDTO> robotRules;

    /**
     * 目标应用
     */
    @NotNull(message = "targetApplicationId not null")
    private Long targetApplicationId;

    public RobotRulesDTO() {
        this.robotRules = new ArrayList<>();
    }
}
